/*
 * @Author: your name
 * @Date: 2021-04-12 00:21:10
 * @LastEditTime: 2021-11-29 16:13:26
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /fun_android/lib/utils/string_utils.dart
 */
import 'dart:convert';
import 'package:crypto/crypto.dart';
import 'package:html_unescape/html_unescape.dart';

class StringUtils {
  static String toMD5(String data) {
    var content = new Utf8Encoder().convert(data);
    var digest = md5.convert(content);
    return digest.toString();
  }

  static String urlDecoder(String data) {
    return HtmlUnescape().convert(data);
  }

  static String removeHtmlLabel(String data) {
    return data.replaceAll(RegExp('<[^>]+>'), '');
  }
}
